#include "app_buffer.h"
#include "string.h"
#include "stdio.h"


int main(int argc, char const *argv[])
{
    
    app_buffer_t *buffer=  app_buffer_init(1024);

    char *text1 ="abcdefg";

    app_buffer_write(buffer, (uint8_t* )text1, strlen(text1));

    char *text2 ="12345";
    
    app_buffer_write(buffer, (uint8_t* ) text2, strlen(text2));


    uint8_t read_buff1[100]={0};
    app_buffer_read(buffer, read_buff1, 100);
    printf("%s\n", read_buff1);


    uint8_t read_buff2[100]={0};
    app_buffer_read(buffer, read_buff2, 100);
    printf("%s\n", read_buff2);

    app_buffer_destroy(buffer); 
    return 0;
}
